package com.itheima.tlias.controller;


import com.itheima.tlias.service.LogService;
import com.itheima.tlias.pojo.OperationLog;
import com.itheima.tlias.pojo.PageResult;
import com.itheima.tlias.pojo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 日志信息控制器
 *
 * @Author mr.luo
 * @Date 12 4月 2025 19:50
 */
@RestController
@RequestMapping("/log")
public class LogController {
    @Autowired
    private LogService logService;

    /**
     * 日志信息的分页查询
     *
     */
    @GetMapping("/page")
    public Result pageQuery(Integer page, Integer pageSize) {
      PageResult<OperationLog> pageResult = logService.pageQuery(page, pageSize);
      return Result.success(pageResult);
    }

}
